<template>
	<view class="integralLogistics">
		<u-steps current="1" direction="column" dot inactiveColor="#999999" activeColor="#ED8417">
			<u-steps-item :title="item.status" v-for="(item, index) in logisticsList" :key="index">
				<view slot="desc">
					<view :class="['logistics_time', index == 0 ? 'fn-cl-333333' : '']">{{ item.time }}</view>
					<view :class="['logistics_desc', index == 0 ? 'fn-cl-333333' : '']">{{ item.context }}</view>
				</view>
			</u-steps-item>
		</u-steps>
	</view>
</template>

<script>
export default {
	data() {
		return {
			id: '',
			logisticsList: []
		};
	},
	onLoad(val) {
		if (val.id) {
			this.id = val.id;
			this.searchExpress();
		}
	},
	methods: {
		searchExpress() {
			this.$api.searchExpress({ id: this.id }).then(res => {
				console.log(res, '获取物流信息');
				this.logisticsList = res.data;
			});
		}
	}
};
</script>

<style lang="scss">
.integralLogistics {
	.logistics_time {
		font-size: 20rpx;
		color: #999;
		margin-bottom: 10rpx;
	}
	.logistics_desc {
		font-size: 20rpx;
		color: #999;
	}
}
</style>
